#ifndef MAINWND_H
#define MAINWND_H

#include <QMainWindow>
#include <QByteArray>

namespace Ui {
class MainWnd;
}

class ComCtrlWidget;
class ParseData;

class MainWnd : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWnd(QWidget *parent = nullptr);
    ~MainWnd();

private slots:
    void onDataReceived(const QByteArray &data);
    void onMessageComming(const QString &text);

    void on_btnSend_clicked();

    void on_btnTest_clicked();

    void on_btnVersion_clicked();

    void on_btnHelp_clicked();

    void on_btnReset_clicked();

    void on_btnRestoreFactory_clicked();

    void on_btnSleep_clicked();

    void on_btnAddressGet_clicked();

    void on_btnNameGet_clicked();

    void on_btnNameSet_clicked();

    void on_btnPinGet_clicked();

    void on_btnPinSet_clicked();

    void on_btnAuthGet_clicked();

    void on_btnAuthSet_clicked();

    void on_btnServiceUuidGet_clicked();

    void on_btnServiceUuidSet_clicked();

    void on_btnCharacteristicGet_clicked();

    void on_btnCharacteristicSet_clicked();

private:
    Ui::MainWnd *ui;

    ComCtrlWidget *p_comCtrlWidget;
    ParseData *p_parseData;

    void sendBtCmd(const QString &text);
};

#endif // MAINWND_H
